package com.ferdict;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Outfit implements Serializable {
	private static final long serialVersionUID = 1L;
	private long outfitId;
	public void setOutfitId(long outfitId) {
		this.outfitId = outfitId;
	}

	private String name;
	private String photoUrl;
	private int numLikes;
	private int numDislikes;
	private long owner;
	private String username;
	private boolean share;
	private List<String> commentList;
	
	public void setCommentList(List<String> commentList) {
		this.commentList = commentList;
	}

	public List<String> getCommentList() {
		return commentList;
	}

	public static class Builder {
		private Outfit outfit;
		
		public Builder() {
			outfit = new Outfit();
		}
		
		public Builder outfitId(long id) {
			outfit.outfitId = id;
			return this;
		}
		
		public Builder name(String name) {
			outfit.name = name;
			return this;
		}
		
		public Builder photo(String url) {
			outfit.photoUrl = url;
			return this;
		}
		
		public Builder numLikes(int count) {
			outfit.numLikes = count;
			return this;
		}
		
		public Builder numDislikes(int count) {
			outfit.numDislikes = count;
			return this;
		}
		
		public Builder owner(long ownerId) {
			outfit.owner = ownerId;
			return this;
		}

		public Builder username(String username) {
			outfit.username= username;
			return this;
		}
		
		public Builder share(boolean isShare) {
			outfit.share = isShare;
			return this;
		}
		
		public Outfit build() {
			outfit.commentList = new ArrayList<String>();
			return outfit;
		}
	}

	public String getUsername() {
		return username;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public long getOutfitId() {
		return outfitId;
	}

	public String getName() {
		return name;
	}

	public String getPhotoUrl() {
		return photoUrl;
	}

	public int getNumLikes() {
		return numLikes;
	}

	public int getNumDislikes() {
		return numDislikes;
	}

	public long getOwner() {
		return owner;
	}

	public boolean isShare() {
		return share;
	}
	
	public void like() {
		numLikes++;
	}

	public void dislike() {
		numDislikes++;
	}

	public void share() {
		share = true;
	}

	public void unshare() {
		share = false;
	}
}
